#include "altglobals.h"

#include <QDir>
#include <QSettings>

namespace Alt {
     QStringList recursiveFileEntryList(const QDir& dir){
          QStringList fileNames;
          QFileInfoList entries = dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
          for(QFileInfoList::ConstIterator i = entries.begin(); i != entries.end(); i++){
               QString entryPath = i->absoluteFilePath();
               if(i->isDir()){
                    fileNames.append(recursiveFileEntryList(QDir(entryPath)));
               } else {
                    fileNames.append(entryPath);
               }
          }
          return fileNames;
     }

     QSettings* settings() {
          return new QSettings(QSettings::IniFormat, QSettings::UserScope, "Alt", "Alt");
     }
}
